package com.swak.monitor.health.web;

import org.springframework.beans.factory.annotation.Autowired;

import com.swak.annotation.Post;
import com.swak.annotation.RestService;
import com.swak.entity.Result;
import com.swak.monitor.health.service.HealthService;

/**
 * 为指标统计提供 Api 输出
 * 
 * @author DELL
 */
@RestService(value = "HealthApi", path = "/api/monitor/health")
public class HealthApi {

	@Autowired
	private HealthService healthService;

	/**
	 * 当前系统的指标信息
	 * 
	 * @return
	 */
	@Post
	public Result health() {
		return Result.success(healthService.health());
	}
}